<?php 
require './Smarty/Smarty.class.php';
$smarty=new Smarty();
$smarty->left_delimiter='{';//更改左定界符
$smarty->right_delimiter='}';//更改右界定符
$smarty->setTemplateDir('./templates/');//设置模板目录
$smarty->setCompileDir('./templates_c/');//设置混编目录
$smarty->assign('name','berry');
define('name','常量name');
setcookie('name','常量name');
$_SESSION['name']='session的值';
$smarty->display('1-demo.html');